Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-navigation/routers

Package Overview
Dependencies
Maintainers
4
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-navigation/routers

Routers to help build custom navigators

  • 5.7.4
  • 5.x
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @react-navigation/routers?

@react-navigation/routers is a package that provides the core router functionality for React Navigation. It allows you to define and manage navigation state, handle navigation actions, and manage the history stack in a React application.

What are @react-navigation/routers's main functionalities?

Creating a Stack Router

This feature allows you to create a stack-based router, which is useful for managing navigation in a stack-like manner where screens are pushed and popped off the stack.

const { StackRouter } = require('@react-navigation/routers');

const router = StackRouter({
  Home: 'HomeScreen',
  Profile: 'ProfileScreen'
});

Creating a Tab Router

This feature allows you to create a tab-based router, which is useful for applications that use a tab bar to switch between different screens.

const { TabRouter } = require('@react-navigation/routers');

const router = TabRouter({
  Home: 'HomeScreen',
  Settings: 'SettingsScreen'
});

Handling Navigation Actions

This feature allows you to handle navigation actions such as navigating to a different screen. The router updates the navigation state based on the action.

const { StackRouter, NavigationActions } = require('@react-navigation/routers');

const router = StackRouter({
  Home: 'HomeScreen',
  Profile: 'ProfileScreen'
});

const state = router.getStateForAction(NavigationActions.navigate({ routeName: 'Profile' }));

Other packages similar to @react-navigation/routers

Keywords

FAQs

Package last updated on 01 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc